import request from '@/utils/request'

// 商品列表
export function categoriesList(params) {
  return request({
    url: `categories`,
    method: 'GEt',
    params
  })
}

// 添加商品
export function categoriesAdd(data) {
  return request({
    url: `categories`,
    method: 'POST',
    data
  })
}

// 修改商品名称
export function categoriesModify(id, data) {
  return request({
    url: `categories/${id}`,
    method: 'PUT',
    data
  })
}

// 删除分类
export function categoriesRemeve(id) {
  return request({
    url: `categories/${id}`,
    method: 'DELETE'
  })
}
